package com.meituan.sdk.model.tuangouNg.atomgoods.productTableUpdate;

import com.meituan.sdk.annotations.ApiMeta;
import java.util.List;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;
import javax.validation.constraints.NotEmpty;

/**
* 上传桌台信息
* This file was automatically generated.
*/
@ApiMeta(
    path = "/tuangou/ng/atomgoods/product/table/update",
    businessId = 1,
    apiVersion = "10017",
    apiName = "product_table_update",
    needAuth = true
)
public class ProductTableUpdateRequest implements MeituanRequest<ProductTableUpdateResponse> {
    /**
    * <p data-diff-id="ct-diff-id-72d619d1-547a-4d00-b379-3552b305c987">附件信息/加价属性类型，1-总部, 2-门店</p>
    */
    @NotNull(message = "scope不能为空")
    @SerializedName("scope")
    private Integer scope;
    /**
    * <p data-diff-id="ct-diff-id-24bf0320-7e72-4f07-82a5-dc33d7290794">总部code，当scope = 1时必填</p>
    */
    @SerializedName("vendorChainId")
    private String vendorChainId;
    /**
    * <p data-diff-id="ct-diff-id-8c786afc-8573-4029-9bea-a5904cbde15e">门店code，当scope = 2时必填</p>
    */
    @SerializedName("vendorShopId")
    private String vendorShopId;
    /**
    * <p data-diff-id="ct-diff-id-98670b69-55c7-43b2-ad82-45b0d174f082">餐盒列表</p>
    */
    @NotEmpty(message = "tableList不能为空")
    @SerializedName("tableList")
    private List<PTable> tableList;

    public Integer getScope() {
        return scope;
    }
    public void setScope(Integer scope) {
        this.scope = scope;
    }
    public String getVendorChainId() {
        return vendorChainId;
    }
    public void setVendorChainId(String vendorChainId) {
        this.vendorChainId = vendorChainId;
    }
    public String getVendorShopId() {
        return vendorShopId;
    }
    public void setVendorShopId(String vendorShopId) {
        this.vendorShopId = vendorShopId;
    }
    public List<PTable> getTableList() {
        return tableList;
    }
    public void setTableList(List<PTable> tableList) {
        this.tableList = tableList;
    }


    @Override
    public MeituanResponse<ProductTableUpdateResponse> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<ProductTableUpdateResponse>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "ProductTableUpdateRequest{" + "scope=" + scope + "," + "vendorChainId=" + vendorChainId + "," + "vendorShopId=" + vendorShopId + "," + "tableList=" + tableList + "}";
    }
}
